#{meta /}

#{title character.jp/}

#{stylesheet 'characters/character-detail.css'/}

#{body}

<div class="container">
	<div class="row">
		<div class="col-lg-10">
			<a href="${refer}"><span class="glyphicon glyphicon-arrow-left">返回</span></a>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-10">
			<h1 class="character-jp font-jp">${character.jp}</h1>
			<h1 class="character-cn">
				#{list items:character.cns, as:'cn'}
					${cn}
				#{/list}
			</h1>
		</div>
		<div class="col-lg-2 text-right">
			<a href="@{characters.CharacterEdit.index(character.id, refer)}" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-wrench"></span> 编辑</a>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-12">
			#{list items:character.pinyins, as:'pinyin'}
				<div class="pinyin">${pinyin}</div>
			#{/list}
		</div>
	</div>
	<hr/>
	#{if character.syllables}
	<div class="row">
		<div class="col-lg-12">
			#{list items:character.syllables, as:'syllable'}
			<div>
				<div class="font-bold">${syllable.value}</div>
				<div class="div-syllable-words">
					#{list items:syllable.words, as:'word'}
						<span class="span-word">
							<span class="font-jp">${word.word}</span>
							(<span class="font-jp">${word.syllable}</span>)
						</span>
					#{/list}
				</div>
			</div>
			#{/list}
		</div>
	</div>
	#{/if}
	<div class="row">
		<div class="col-lg-12">
			<div>
				#{if character.fixwords}
					<div class="font-bold">熟字训</div>
					<div>
						#{list items:character.fixwords, as:'word'}
							<span class="span-fixword">
								<span class="font-jp">${word.word}</span>
								(<span class="font-jp">${word.syllable}</span>)
							</span>
						#{/list}
					</div>
				#{/if}
			</div>
		</div>
	</div>
	<div class="row">
		<table class="table table-bordered">
			#{list items:words, as:'word'}
				<tr>
					<th><a class="word-link" href="${word.href}">${word.value}</a></th>
					<td>
						#{list items:word.alias, as:'s'}
							<div>${s}</div>
						#{/list}
					</td>
					<td>
						#{list items:word.meanings, as:'meaning'}
							<div>${meaning}</div>
						#{/list}
					</td>
					<td>
						#{list items:word.types, as:'type'}
							<span>${type}</span>
						#{/list}
					</td>
				</tr>
			#{/list}
		</table>
	</div>
</div>

#{/body}
